char *ptr;
ptr = malloc(10);
/*
*Dynamic memory creation using malloc
*Language: C
*/
#include<stdio.h>
//To use malloc function in our program
#include<stdlib.h>
int main()
{
int *ptr;
//allocating memory for 1 integer
ptr = malloc(sizeof(int));
if(ptr != NULL)
printf("Memory created successfully\n");
return 0;
}